#ifndef __OPENGL_RUNTIME__H
#define __OPENGL_RUNTIME__H

#include <EGL/egl.h>
#include <GLES3/gl3.h>
#include <GLES3/gl32.h>
#include "common/common.h"
#include "common/define.h"
#include "common/log.h"

namespace PanNN {
namespace OpenGL {
class OpenGLRuntime {
   public:
    OpenGLRuntime();
    virtual ~OpenGLRuntime();

    ErrorCode Init();

    static GLuint LoadShader(GLenum shaderType, const char *pSource);
    static GLuint CreateComputeProgram(const char *pComputeSource);

    // ErrorCode CopyBufferToImage();
    // ErrorCode CopyImageToBuffer();
    // ErrorCode CopyHostToDeviceBuffer();
    // ErrorCode CopyDeviceBufferToHost();
    // ErrorCode CopyDeviceToHostImage();

    EGLContext m_context;
    EGLDisplay m_display;
    EGLSurface m_surface;
};
}  // namespace OpenGL
}  // namespace PanNN

#endif  // __OPENCL_RUNTIME_H
